package AbstractRational;

//import RationalPackaging.Rational.*;

public class Add extends Operating{
	
	public Add(){
		
	}
	public Add(int a,int b){
	      super(a,b);
	}
	public Operating yunsuan(Operating r){
		int a=r.getNumerator();
		int b=r.getDenominator();
		int newNumerator=numerator*b+denominator*a;
		int newDenominator=denominator*b;
		Add result=new Add(newNumerator,newDenominator);
		return result;
	}

}
